package com.lyk.coursearrange.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyk.coursearrange.dao.CustomerInformationDao;
import com.lyk.coursearrange.dao.RecruitmentInformationDao;
import com.lyk.coursearrange.entity.Distribute;
import com.lyk.coursearrange.entity.RecruitmentInformation;
import com.lyk.coursearrange.service.DistributeService;
import com.lyk.coursearrange.service.RecruitmentInformationService;
import com.lyk.coursearrange.util.DistributeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class RecruitmentInformationServiceImpl extends ServiceImpl<RecruitmentInformationDao, RecruitmentInformation> implements RecruitmentInformationService {
    String admin_no = null;

    @Autowired
    private CustomerInformationDao customerInformationDao;

    @Autowired
    private DistributeUtil distributeUtil;

    @Override
    @Transactional
    public boolean saveR(RecruitmentInformation recruitmentInformation) {
//        long distribute=2;//招聘类型
//        String adminNo=distributeUtil.GetDistributeAdmin(distribute);
//        if (adminNo.equals("")){
//            //没有该属性下的数据，返回false
//            return false;
//        }
        recruitmentInformation.setAdminNo(recruitmentInformation.getAdminNo());
        boolean save = this.save(recruitmentInformation);
        return save;
    }
}
